
import {createRouter,createWebHistory} from 'vue-router'

const router=createRouter({
  history:createWebHistory(),
  routes:[
    {
      path:'/',
      redirect:'register'
    },
    {
      //注册功能
      path:'/register',
      component:()=>import('../views/Register.vue')
    },
    {
      //登录页面
      path:'/login',
      component:()=>import('../views/LoginView.vue')
    },
    {
      //用户登录列表
      path:'/userlist',
      component:()=>import('../views/UserListView.vue')
    },
    {
      //用户查看投资列表
      path:'/yfinancelist',
      component:()=>import('../views/YFinanceLIseView.vue')
    },
    {
      //管理员查看投资列表
      path:'/gfinancelist',
      component:()=>import('../views/GFinanceListView.vue')
    },
    {
      //用户查看借款页展示
      path:'/userborrow',
      component:()=>import('../views/UserBorrowView.vue')
    },
    {
      //用户还款
      path:'/userhborrow',
      component:()=>import('../views/UserHBorrowView.vue')
    },
    {
      //用户借款
      path:'/userborrowadd',
      component:()=>import('../views/UserBorrowAdd.vue')
    },
    {
      //管理员查看借款列表
      path:'/gborrowlist',
      component:()=>import('../views/GBorrowList.vue')
    },
  ]
})

export default router